<template>
	<div id="status" style="height: 260px;width: 100%;"></div>
</template>
  
<script>
import * as echarts from 'echarts';
export default {
	props: {
    list: {
      type: Array,
			default: () => []
    }
  },
	data() {
		return {
			listData:[]
		}
	},
	mounted() {
		this.initChart(this.list)
		// this.listData=this.list
		// console.log('list',this.list);
	},
	methods: {
		initChart() {
			var chartDom = document.getElementById('status');
			var myChart = echarts.init(chartDom);
			var option;

			option = {
				title: {
					text: 'T_1订单统计',
					// subtext: '订单统计',
					left: 'center'
				},
				tooltip: {
					trigger: 'item'
				},
				legend: {
					orient: 'horizontal',
					y: 'bottom',
					x: 'center'
				},
				series: [
					{
						name: 'T_1订单统计',
						type: 'pie',
						radius: '50%',
						data: [
							{ value: 1048, name: '其他订单' },
							{ value: 735, name: '今日被分配订单' },
							// { value: 580, name: 'Email' },
							// { value: 484, name: 'Union Ads' },
							// { value: 300, name: 'Video Ads' }
						],
						emphasis: {
							itemStyle: {
								shadowBlur: 10,
								shadowOffsetX: 0,
								shadowColor: 'rgba(0, 0, 0, 0.5)'
							}
						}
					}
				]
			};

			option && myChart.setOption(option);
		}
	}
}
</script>
  
<style lang="scss" scoped>

</style>
  